<%@ page language="java" contentType="text/html; charset=ISO-8859-1"  pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/views/header.jsp" %>
<html>
    <head>
        <title>Welcome to Cheapflix</title>
        <link rel="stylesheet" type="text/css" href="/cheapflix/css/style.css" />
        <script type="text/javascript" src="<%=request.getContextPath()%>/js/login.js"/>
        <script type="text/javascript">
            
            $(document).ready(function(){
             //   alert("HEY!");
            });
        </script>
    </head>
    <body>
        <div class="outer">


            <div class="row rowstyle">
                <h1>Welcome to Cheapflix</h1>

                <h2>The place where movie lovers meet.</h2>

                <div class="outer">
                    <c:if test="${loginSuccesssMessage != null && loginSuccesssMessage != ''}">
                        <div class="message">
                            <c:out value="${loginSuccesssMessage}"/>
                        </div>
                    </c:if>
                    <form action="/cheapflix/login" method="post" id="loginform" class="loginform">
                        <label>Username</label>
                        <input type="text" name="username" id="usernameId" class="text"><br/>
                        <label>Password</label>
                        <input type="password" name="password" id="passwordId" class="text"><br/>
                        <input type="submit" value="Login" >
                        <a href="javascript:showRegister()">Not a Member?</a>
                    </form>

                    <form action="/cheapflix/register" id="registerForm" method="post" style="display: none;" class="loginform">
                        <div class="message">
                            Register Now!
                        </div>

                        <label>Username</label>

                        <input type="text" name="username" id="username" class="text" /><br/>
                        <div id="status"></div>

                        <label>First Name</label>

                        <input type="text" name="nameFirst" id="nameFirstId" class="text"/><br/>


                        <label>  Last Name</label>

                        <input type="text" name="nameLast" id="nameLastId" class="text"/><br/>

                        <label>   Email</label>

                        <input type="text" name="email" id="emailId" class="text" /><br/>



                        <label>  Password</label>

                        <input type="password" name="password1" id="password1" class="text" /><br/>

                        <label>  Re-enter Password</label>
                        <input type="password" name="password2" id="password2" class="text" /><br/>
                        <input type="submit" value="Register"/>

                        <a href="javascript:showLogin()">Return to Login</a>

                    </form>

                </div>
                 <%@ include file="/WEB-INF/views/footer.jsp" %>
            </div>
        </div>
    </body>
</html>